package com.zengqingfa.springboot.validation.demo.dto;

import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class EmpGroup implements Serializable {
    private static final long serialVersionUID = 281903912367009575L;

    @NotNull(message = "id 不能为 null",groups = UpdateGroup.class)
    private Integer id;

    @NotNull(message = "name 不能为 null",groups = {AddGroup.class,UpdateGroup.class})
    private String name;

    private Double salary;

    private Integer age;

    private String email;

    public interface AddGroup {
    }


    public interface UpdateGroup {
    }

}